#pragma once
#include <string>

char zh[] = "中文";
const size_t zh_len = (sizeof(zh) - 1) >> 1;

bool IsEqual(const std::string& src, const std::string& dest, size_t src_pos, size_t dest_pos, size_t len){
  if(len == 0){
    return true;
  }
  if(src[src_pos] == dest[dest_pos]
      && IsEqual(src, dest, src_pos+1, dest_pos+1, len-1)){
    return true;
  }
  return false;
}

bool zh_CNIsInclude(const std::string& src, const std::string& dest){
  size_t p_src = 0;
  size_t pre = 0;
  while(p_src + zh_len <= src.size()){
    size_t p_dest = 0;
    pre = p_src;
    while(p_dest < dest.size()){
      if(IsEqual(src, dest, p_src, p_dest, zh_len)){
        p_dest += zh_len ;
        p_src += zh_len ;
      }
      else{
        break;
      }
    }
    if(p_dest >= dest.size()){
      return true;
    }
    p_src = pre + zh_len ;
  }
  return false;
}
